package com.ostrich.cloud.ostrichManagerWeb.client;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ostrich.cloud.common.result.Result;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.annotation.Resource;
import java.util.Date;

@FeignClient(contextId = "salesManagerClient",name="ostrichManagerWeb")
@Api("管理营业额相关接口")
public interface SalesManagerClient {

    @GetMapping("getSalesOnly")
    @ApiOperation("根据商家id查看营业额接口")
    public Result getSalesOnly(@RequestParam("current") Integer current,@RequestParam("size") Integer size,
            @RequestParam("businessId") Integer businessId
            ,@RequestParam(value = "startTime",required = false) @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") Date startTime,
             @RequestParam(value = "endTime",required = false) @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") Date endTime);

    @GetMapping("getAllSales")
    @ApiOperation("查看全部流水")
    public Result getAllSales(@RequestParam("current") Integer current,@RequestParam("size") Integer size);

}
